<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="language" content="en" />
	<?php if(!empty($this->clips['og_metas'])) echo $this->clips['og_metas']?>
	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->getBaseUrl(true); ?>/css/main.css" />
	<link rel="icon" href="<?php echo Yii::app()->getBaseUrl(true); ?>/images/favicon.ico" type="image/x-icon">

	<title><?php echo CHtml::encode($this->pageTitle); ?></title>
</head>
<body>
<div id="page" class="container">
	<div id="header">
		<?php if (!Yii::app()->user->isGuest): ?>
			<div id="account">
				<span><?php echo Yii::app()->user->first_name ?> <?php echo Yii::app()->user->last_name ?></span> - 
				<?php echo CHtml::link(Yii::app()->user->store_name, array('store/index','name'=>Yii::app()->user->store_name)); ?> - 
				<?php echo CHtml::link('Cuenta', array('state/index','id'=>Yii::app()->user->store_id)); ?> - 
				<?php echo CHtml::link('Visitas', array('state/stats','id'=>Yii::app()->user->store_id), array('rel'=>'facebox')); ?> - 
				<?php echo CHtml::link('Salir', array('site/logout')); ?>
			</div>	
		<?php else: ?>
			<div id="account" style="width:320px">
				<?php if(!empty($this->clips['social'])) echo $this->clips['social']?>
			</div>
		<?php endif ?>
		<div id="title">
			<h1><?php echo CHtml::link('', Yii::app()->homeUrl); ?></h1>
		</div>
	</div>
	<?php echo $content; ?>
</div>
<div id="links">
	<div id="links-inner" class="container">
		<div class="column">
			<img src="<?php echo Yii::app()->getBaseUrl(true); ?>/images/simbol.png" class="logo"/>
		</div>
		<div class="column">
			<h2>Contacto</h2>
			<p><strong>E-mail:</strong><br/>elcarmen@itegracion.com</p>
			<p><strong>Teléfonos:</strong><br/>(+51 84) 984-206669<br/>(+51 84) 084-277374</p>
		</div>
		<div class="column">
			<h2>¿Tienda Nueva?</h2>
			<ul>
				<li><?php echo CHtml::link('Tour Virtual', array('/site/page', 'view'=>'about')); ?></li>
				<li><?php echo CHtml::link('Registra tu Tienda', array('store/new')); ?></li>
				<li><?php echo CHtml::link('Terminos y Condiciones', array('/site/page', 'view'=>'term')); ?></li>
				
			</ul>
		</div>
		<div class="column">
			<h2>¡Yá estoy!</h2>
			<ul>
				<li><?php echo CHtml::link('Administra Tienda', array('site/login')); ?></li>
				<li><?php echo CHtml::link('Documentación', array('/site/page', 'view'=>'docs')); ?></li>
			</ul>
		</div>
	</div>
</div>
<div class="clear"></div>
<div id="footer">
	<p>elcarmen.pe &copy <a href="http://itegracion.com">Itegracion</a> 2012</p>
</div>
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-30048103-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
</body>
</html>
